Skip to content

test(cli): add Quillhaven systems conformance corpus with TypeScript runner - #718

Merged
dmealing merged 2 commits into
mainfrom
fm/mo-140-w3-f1
Dec 6, 2026
Merged

dmealing merged 2 commits into
mainfrom
fm/mo-140-w3-f1

Conversation

@dmealing

@dmealing dmealing commented Dec 6, 2026 •

Copy link
Copy Markdown
Member

What Changed

  • Adds fixtures/systems-conformance/quillhaven/: six repositories (11 metadata files) with their own .metaobjects/config.json, committed dependency snapshots and locks, plus publish.json, expected/<repo>.canonical.json, expected/packages/*.json, and cases.json (22 single-change cases, one marked knownGap). A corpus README documents the format.
  • Adds server/typescript/packages/cli/test/systems-conformance.test.ts, which runs four arms: publish (each published contract package is byte-identical to the consumer-committed snapshot and lock entry, and loads with nothing beside it), reader (each repository loads from its own root with its own dependencies), packages (each package is byte-identical across every root that loads it), and cases (each change raises the expected loader code or leaves the canonical form unchanged). The known-gap case is skipped and reported.
  • Documents the corpus as a new row and section in docs/CONFORMANCE.md (TypeScript passing; Java, C#, Python and Rust rows marked planned), and updates the corpus count from 49 to 50 in AGENTS.md and examples/showcase/site-payload.json. Adds a changelog fragment noting corpus-only change.

No product behavior, vocabulary, or generator output changed.

Where this differs from the round-2 design

The corpus follows main's vocabulary wherever the design and main disagree:

  1. Two REST paths take their key as input. PaymentsApi.getCharge (/v2/charges/{chargeId}) and ShipmentApi.trackShipment (/shipments/{trackingNumber}) had a key in the path. On main a path placeholder must be the primary key of the operation's target entity, and a contract package declares values, not entities, so both failed with ERR_BINDING_PATH_MISMATCH. Each now takes its key as an input value (ChargeLookup, TrackingLookup) at POST /v2/charges/lookup and GET /shipments/track.
  2. The weekly settlement export names its day. SettlementFeed.weeklySettlement @availableBy is Mon 06:00, not 06:00: main requires a weekly @availableBy to name its day (ERR_BAD_ATTR_VALUE). The design's spelling is kept as the case a-weekly-export-without-a-day.
  3. A stub beside its company's own package is a known gap. The design expects ERR_DEPENDENCY_PACKAGE_NOT_OWNED. On main a local node with the same name as a dependency node merges with it, and the refusal covers only new nodes; the load fails today with ERR_MERGE_CONFLICT only because the stub spells owner: Tidewell where the published form has tidewell::Tidewell. The case the-stub-refuses-a-publisher-beside-it keeps the design's expectation, marked knownGap, and runners skip it with that reason. Decision: the ownership rule is adopted per the design and ships as its own follow-up in every port, which un-skips this case.

Not covered here: the estate half (delivery pack, TypeScript only), and the whole-model rules (ERR_API_NOT_CARRIED, ERR_API_NO_PROVIDER, the extract chain), which join cases.json as "stage": "verify" with the rule hook (H2).

Validation

Risk Assessment

✅ Low: Corpus-only change: 6 repos with 11 metadata files, expected snapshots, 22 cases (1 documented knownGap skip) and one TS runner, all matching the stated intent; counts in docs, changelog and AGENTS.md agree with the files, and no product code or vocabulary changed.

Testing

Drove the three intent scenarios through the real loader using the committed Quillhaven corpus and its TypeScript runner: each repository loads from its own root to expected canonical output, every package is byte-identical from every root that loads it, contract packages publish standalone, and 21 cases raise their loader codes or keep the model byte-identical when the stub gives way. All executed runs pass (31 pass, 1 skip, 0 fail on the full file). Broad regression came from the configured test command scripts/ci-local.sh --affected --strict-toolchains with its passing outcome at this commit. No evidence files were written; the output is test-runner text, not a reviewer-visible product surface. The skipped case is a known gap recorded in cases.json, not a failure.

  • Live validation: ✅ go - 4 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Reader: each Quillhaven repository loads from its own root to its committed canonical model (local TS loader, synthetic fixture corpus) ✅ pass live bun test test/systems-conformance.test.ts in server/typescript/packages/cli; 'reader: <repo> loads from its own root' arms pass
Packages: every contract package is byte-identical whichever root loads it (local TS loader, fixture corpus) ✅ pass live 'packages: every package reads the same from every root that loads it' passes in the same bun test run
Contract packages stand alone: a published package loads with nothing beside it, and publish selections match committed snapshots (local TS loader) ✅ pass live 'publish: a published contract package loads with nothing beside it' and 'publish: every published selection is exactly the snapshot each consumer committed' pass
Stub gives way: the 21 cases.json changes raise their loader codes, or leave the model byte-identical when Tidewell's own package replaces the stub (adversarial: wrong-code and no-op regressions) ✅ pass live 'case: <name>' arms pass in the bun test run (31 pass total)
Adversarial: stub beside Tidewell's own package refused with ERR_DEPENDENCY_PACKAGE_NOT_OWNED ⏸️ untested no The design expects the refusal, but main merges same-named dependency nodes, so the case is a recorded known gap and was skipped by design. Driving it would require the ownership-rule decision, which…
  • Outcome: ⚠️ 1 warning across 1 run (6m22s)

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

⚠️ **Test** - 1 warning
  • ⚠️ fixtures/systems-conformance/quillhaven/cases.json - Case: a stub left beside Tidewell's own package should be refused with ERR_DEPENDENCY_PACKAGE_NOT_OWNED. Main merges same-named dependency nodes instead, so the case is skipped as knownGap. Needs a human decision: adopt the ownership rule (loader change) or keep the design expectation as a gap.
  • Live validation: ✅ go - 4 of 5 scenarios driven live against the product
Scenario Result Live Evidence
Reader: each Quillhaven repository loads from its own root to its committed canonical model (local TS loader, synthetic fixture corpus) ✅ pass live bun test test/systems-conformance.test.ts in server/typescript/packages/cli; 'reader: <repo> loads from its own root' arms pass
Packages: every contract package is byte-identical whichever root loads it (local TS loader, fixture corpus) ✅ pass live 'packages: every package reads the same from every root that loads it' passes in the same bun test run
Contract packages stand alone: a published package loads with nothing beside it, and publish selections match committed snapshots (local TS loader) ✅ pass live 'publish: a published contract package loads with nothing beside it' and 'publish: every published selection is exactly the snapshot each consumer committed' pass
Stub gives way: the 21 cases.json changes raise their loader codes, or leave the model byte-identical when Tidewell's own package replaces the stub (adversarial: wrong-code and no-op regressions) ✅ pass live 'case: <name>' arms pass in the bun test run (31 pass total)
Adversarial: stub beside Tidewell's own package refused with ERR_DEPENDENCY_PACKAGE_NOT_OWNED ⏸️ untested no The design expects the refusal, but main merges same-named dependency nodes, so the case is a recorded known gap and was skipped by design. Driving it would require the ownership-rule decision, which…
  • scripts/ci-local.sh --affected --strict-toolchains
  • bun test test/systems-conformance.test.ts in server/typescript/packages/cli (full file: 31 pass, 1 skip, 0 fail)
  • bun test test/systems-conformance.test.ts --test-name-pattern &#34;stub|reader|standalone|stand alone|byte|loader|contract&#34; (11 pass, 1 skip, 0 fail)
  • Read systems-conformance.test.ts test structure: publish arm, reader arm per repo, packages byte-identity arm, 21 case arms, knownGap skip
  • Baseline: scripts/ci-local.sh --affected --strict-toolchains passed at target commit (not re-run; no source changed in this turn)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…t runner

fixtures/systems-conformance/quillhaven/ is the systems half of the round-2
test estate: six repositories (quillhaven-common, larkspur-pay,
corvid-wayfinder, quillhaven-rates, quillhaven-parcels, quillhaven-ledger)
holding the design's eleven files, each with its own config, committed
dependency snapshots and lock. Parcels and Ledger import each other's
contract package only.

The TypeScript runner (cli/test/systems-conformance.test.ts) checks four
arms: every publish.json selection is the snapshot its consumers committed
and the lock entry that pins it, and each contract package publishes from its
own file alone; each repository loads from its own root to
expected/<repo>.canonical.json; every package is byte-identical from every
root that loads it (expected/packages/); and 21 cases.json changes raise
their loader code, or, when the Tidewell stub gives way to Tidewell's own
package, leave the model byte-identical.

Two design files changed to load on main: two REST paths keyed by a value
object now take the key as input, and the weekly settlement export names its
day. Adds the CONFORMANCE.md row and section and moves the corpus counts to
50.
The design expects a stub left beside Tidewell's own package to be refused
with ERR_DEPENDENCY_PACKAGE_NOT_OWNED. Main merges same-named dependency
nodes instead, so the case stays in cases.json marked knownGap, and runners
skip it and report the reason until the ownership rule is decided.
@dmealing
dmealing merged commit 3635e18 into main Dec 6, 2026
11 checks passed
@dmealing
dmealing deleted the fm/mo-140-w3-f1 branch December 6, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant